
import styles from './QuestionTitle.module.scss'

import { titlePropsType } from '@/types/props'
import React, { FC } from 'react'


const QuestionTitle:FC<titlePropsType> = ({fe_id,props}) => {
  const {text,isCenter,level} = props

  const fontSize =() => {
    if(level === 1) return '22px'
    else if(level === 2) return '18px'
    return '16px'
  }

  return (
    <div className={styles.container}>
      <input type="hidden" name={fe_id} value={''} />
      <div style={{marginBottom: '20px',textAlign: isCenter? 'center' : 'left', fontSize: fontSize(),fontWeight: 'bold'}}>{text}</div>
    </div>
  )
}

export default QuestionTitle
